System and method for dynamically adjusting a recording bitrate to accommodate a writing speed of a storage device

ABSTRACT

A system for adapting various writing speeds of storage devices and methods for making and using same are provided. A recording device maintains a data buffer with a buffer size. Data recorded by the recording device with a selected recording bitrate is stored into the data buffer of the recording device. The recorded data is written from the data buffer into a selected storage device that is attached onto the recording device. An amount of recorded data stored in the data buffer is compared with two or more sets of thresholds, and the recording bitrate of the recording device can be adjusted, as needed, in response to the results of the comparison. By adjusting the recording bitrate, the recording device advantageously can accommodate storage devices with various speeds while maintaining the quality of the recorded data and maximizing the capacity of the storage device.

CROSS-REFERENCE TO RELATED APPLICATION

This is a continuation application of International Application No.PCT/CN2014/083264, filed on Jul. 29, 2014, the entire contents of whichare incorporated herein by reference.

FIELD

The disclosed embodiments relate generally to memory storage systems andmethods, and more particularly, but not exclusively, to a system andmethod for accommodating the writing speeds of various storage devicesby adjusting a recording bitrate of a recording device.

BACKGROUND

Many recording devices are equipped with functionalities of continuousdata recording, wherein the recorded data is generally stored to astorage device. Typical recording devices include cameras with imagerecording capability and audio recording devices, such as digital voicerecorders. The amount of data created per unit time, a definition forbitrate, varies among the recording devices used to generate recordeddata. Some of those devices are able to generate recorded data with veryhigh bitrates. On the other hand, available storage devices of differentgrades provide different writing speeds, which are also influenced bythe sizes and operating environment of the storage devices.

Several issues exist in such typical systems when the recording deviceattempts to write recorded data to the storage device. When the amountof recorded data created in a unit time period by the recording deviceexceeds the writing speed of the storage device, the data writeoperation fails, and so does the data recording. In other words, thestorage device is not fast enough to receive and store the datagenerated by the recording device. To resolve this issue, the storagedevice would need to be replaced by one with higher writing speed, orthe recording device would need to be configured to a lower bitrate.Because of the recording bitrate reduction, the quality of the recordsstored in the storage device is reduced.

For example, a camera can store continues image data to an SD cardattached to the camera. If the camera is adjusted to a high resolutionsetting, a large amount of image data will be generated per unit time.The high bitrate of the image data increases the requirement for theminimum writing speed of the SD card, meaning high cost for the imagesrecorded. Alternatively, if an SD card with a lower writing speed isused, the recording bitrate of the camera would need to be reduced toaccommodate the lower writing speed of the SD card, sacrificing thequality of the images recorded.

Therefore, there is a need for a system and method for accommodatingstorage devices with various speeds while maintaining the quality of therecorded data and maximizing the capacity of the storage device.

SUMMARY

In accordance with a first aspect of the subject matter disclosedherein, a method is provided for enabling a recording device with anadjustable recording bitrate to adapt to a predetermined writing speedof a storage device, such as a secure digital (SD) card, removablyattached to the recording device, the method comprising: storing datarecorded by the recording device at a selected recording bitrate in adata buffer coupled with the recording device; writing the recorded datafrom the data buffer into the storage device; determining whether therecorded data in the data buffer has reached a predetermined thresholdselected from two or more sets of predetermined thresholds; andadjusting the recording bitrate of the recording device in accordancewith the determining.

In accordance with some embodiments, the method further comprisesestablishing the two or more sets of predetermined thresholds.

In accordance with some embodiments of the method, the establishing thetwo or more sets of predetermined thresholds comprises establishing aset of ascending thresholds reflecting ascending data amount changes ofthe data buffer and a set of descending thresholds reflecting descendingdata changes of the data buffer.

In some embodiments, the method further comprises detecting a trend ofdata amount and a data amount within the data buffer.

In some embodiments of the method, the detecting includes comparingamounts of the recorded data within the data buffer by polling the dataamount at specified time intervals.

In some other embodiments, the establishing the set of ascendingthresholds includes: establishing a first specified ascending thresholdwithin a range of sixty percent (60%) to eighty percent (80%) of thebuffer size, such as seventy-five percent (75%) of the buffer size: andestablishing a second specified ascending threshold being greater thanthe first specified ascending threshold and within a range of seventypercent (70%) to ninety-five (95%) of the buffer size, such as ninetypercent (90%) of the buffer size.

In some preferred embodiments of the method, the establishing a set ofdescending thresholds includes establishing a first specified descendingthreshold within a range of thirty percent (30%) to fifty percent (50%)of the buffer size, such as thirty percent (30%) of the buffer size.

In some embodiments of the method, the adjusting the recording bitrateof the recording device includes at least one of: reducing the recordingbitrate when the recorded data in the data buffer reaches above a firstspecified ascending threshold; stopping the data recording when therecorded data in the data buffer reaches above a second specifiedascending threshold; and increasing the recording bitrate when therecorded data in the data buffer reaches below a specified descendingthreshold.

In some embodiments of the method, the adjusting a recording bitrate ofthe recording device further includes reducing the recording bitrate toa range of thirty percent (30%) to eighty percent (80%) of the selectedrecording bitrate, such as fifty percent (50%) of the selected recordingbitrate, when the data in the data buffer reaches the first specifiedascending threshold.

In some embodiments of the method, the adjusting a recording bitrate ofthe recording device includes at least one of: stopping the datarecording when the recorded data in the data buffer reaches above thesecond specified ascending threshold; increasing the recording bitrateto the selected recording bitrate when the recorded data in the databuffer reaches below the first specified descending threshold; andmaintaining the recording bitrate when the recorded data in the bufferis between the second specified ascending threshold and the firstspecified descending threshold.

In some embodiments of the method, the establishing the set ofdescending thresholds further includes establishing a second specifieddescending threshold within the range of seventy percent (70%) toninety-five percent (95%) of the buffer size, such as ninety percent(90%) of the buffer size.

In some embodiments of the method, the adjusting the adjustablerecording bitrate of the recording device includes at least one of:stopping the data recording when the recorded data in the data bufferreaches above the second specified ascending threshold; and after thedata recording is stopped, resuming the data recording with a reducedrecording bitrate when the recorded data in the data buffer reachesbelow the second specified descending threshold being greater than thefirst specified descending threshold.

In some embodiments of the method, the recording device is an imagerecording device or an audio recording device.

In some embodiments, the storing data further comprises configuring thedata buffer with a buffer size within a range of 16 MB to 512 MB, suchas 64 MB.

In accordance with the second aspect of this subject matter disclosed, arecording device with an adjustable recording bitrate to adapt to apredetermined writing speed of a storage device, such as a securedigital (SD) card, removably attached to the recording device isprovided, the recording device comprising: a data buffer with a buffersize for storing recorded data and for writing the recorded data intothe storage device; and, a control system for determining whether therecorded data in the data buffer has reached a predetermined thresholdselected from two or more sets of predetermined thresholds and adjustingthe recording bitrate of the recording device in response to therecorded data in the data buffer reaching the predetermined threshold.

In some embodiments, the two or more sets of predetermined thresholdscomprise a set of ascending thresholds associated with ascending datachanges of the data buffer and a set of descending thresholds associatedwith descending data changes of the data buffer.

In some embodiments, the one set of ascending thresholds comprises: afirst specified ascending threshold within a range of sixty percent(60%) to eighty percent (80%) of the buffer size, preferablyseventy-five percent (75%) of the buffer size; and a second specifiedascending threshold, being greater than the first specified ascendingthreshold, within a range of seventy percent (70%) to ninety-fivepercent (95%) of the buffer size, such as ninety percent (90%) of thebuffer size.

In some embodiments, the one set of descending thresholds comprise afirst specified descending threshold within a range of thirty percent(30%) to fifty percent (50%) of the buffer size, such as 30% of thebuffer size.

In some other embodiments, the control system reduces the recordingbitrate when the recorded data in the buffer reaches the first specifiedascending threshold, the reduced recording bitrate being in the range ofthirty percent (30%) to eighty percent (80%) of the selected recordingbitrate, such as fifty percent (50%) of the selected recording bitrate.

In some preferred embodiments, the control system stops the datarecording when the recorded data in the data buffer reaches above thesecond specified ascending threshold; the control system increases therecording bitrate to the selected recording bitrate when the recordeddata in the data buffer reaches below the first specified descendingthreshold; the control system maintains the recording bitrate when therecorded data in the data buffer is between the second specifiedascending threshold and the first specified descending threshold.

In some embodiments of the recording device, the storage devicecomprises a secure data (SD) card.

In some other embodiments of the recording device, the storage device isremovably attached with the recording device.

In some other embodiments, the recording device is a camera capable ofrecording image data or an audio recorder capable of recording audiodata.

In the third aspect of the subject matter, an unmanned aerial vehicle(UAV) is provided, comprising a vehicle body and a recording deviceaccording to any one of the embodiments coupled with the vehicle body.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an exemplary top-level block diagram illustrating anembodiment of a recording device with a data buffer.

FIG. 2A is an exemplary top-level flowchart illustrating an embodimentof a method for maintaining the data buffer of FIG. 1.

FIG. 2B is an exemplary flowchart further illustrating the embodiment ofthe method of FIG. 2A, wherein data recording starts at a selected bitrate and the recorded data is stored in a data buffer.

FIG. 3 is an exemplary flowchart illustrating the embodiment of themethod of FIG. 2B, wherein a volume of recorded data stored in thebuffer is compared to both an ascending threshold and a descendingthreshold.

FIG. 4 is an exemplary flowchart illustrating the embodiment of themethod of FIG. 2, wherein the volume of recorded data stored in thebuffer is compared to two sets of thresholds.

FIG. 5 is an exemplary block diagram illustrating an embodiment of thedata buffer of FIG. 1.

FIG. 6 is an exemplary block diagram illustrating an embodiment of thedata buffer of FIG. 5, wherein two sets of thresholds are associatedwith the data buffer.

FIG. 7 is an exemplary timeline diagram showing illustrative amounts ofrecorded data in the data buffer of FIG. 6 at specified time points.

It should be noted that the figures are not drawn to scale and thatelements of similar structures or functions are generally represented bylike reference numerals for illustrative purposes throughout thefigures. It also should be noted that the figures are only intended tofacilitate the description of the preferred embodiments. The figures donot illustrate every aspect of the described embodiments and do notlimit the scope of the present disclosure.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present disclosure sets forth a system and method for allowing arecording device to adapt removable storage devices, such as securedigital (SD) cards, with various writing speeds. Although generallyapplicable to any conventional type of recording device that storesrecorded data into a removable storage device, the system and methodwill be described with reference to a camera capable of recordingcontinues images for storage on a secure digital (SD) card forillustrative purposes only.

Turning to FIG. 1, a camera 100 is illustrated as having a lens 101 forreceiving light that represents an image (not shown). The light receivedvia the lens 101 is provided to a sensor 102 for generating data flow111. The data flow 111 typically is an analog data flow that comprisescontinues image data, i.e. video data. Data flow 111 is converted intodigital data flow 112 via a digital signal processor (DSP) 103. Thedigital data in data flow 112 includes digitized image data and is shownas being written into a data buffer 104, which may be allocated in theinternal and/or external camera memory (not shown) of the camera 100.The data buffer 104, in turn, provides digital data in data flow 113 toa storage device 105, such as a secure digital (SD) card. The digitizedimage data thereby is stored in the storage device 105. Therefore, thedata buffer 104 can serve as a temporary data holding area between thedata flow 112 created by the DSP 103 and storage device 105. Inaddition, the data flow 111 corresponds with a recording filtrate of thecamera 100. The data flow 112 is directly related to data flow 111.Therefore, data flow 112 is indirectly related to the recording bitrate.As indicated in FIG. 1, all elements (102,103, 104 and 105) of thecamera 100 operate under control of a control system 120.

Now referring to FIG. 5, which shows the data flows 112, 113 enteringand exiting the data buffer 104. As discussed above, the data flow 112is the data flow writing into the data buffer 104. On one hand, thefilled portion of data buffer 104 tends to expand as data flow 112 iswritten into the data buffer 104. On the other hand, when the recordeddata in the data buffer 104 is read out to the storage device 105 (shownin FIG. 1), the filled portion of the data buffer 104 tends to shrinkbecause corresponding space is flushed in the data buffer 104 once therecorded data is read out. The writing speed of the storage device 105is normally fixed for a particular storage device 105 because the speedis specific to hardware configurations of the storage device 105. So,one purpose of the method 200 is to maintain a data amount (or datalevel) in the data buffer 104 by controlling the data flow 112, which isaccomplished by adjusting the recording speed of the camera 100 (shownin FIG. 1).

FIG. 2A shows a top-level overview of a method 200 for enabling arecording device, such as camera 100 (shown in FIG. 1), to adapt astorage device 105 (shown in FIG. 1), selected from a plurality ofstorage devices with various writing speeds. In FIG. 2A, the method 200is shown in three simple function blocks 210, 220 and 230. At functionblock 210, the recording device starts a data recording, which simplyincludes writing its recorded data into a data buffer 104 (shown in FIG.1), from where the recorded data is written into the storage device 105.When the data recording is started, a control system 120 of therecording device starts to monitor the data amount of the data buffer104, as indicated at 220. When the data amount of the data buffer 104reaches a predetermined threshold, the control system 120 (shown inFIG. 1) will control the data amount by either adjusting the recordingbitrate configured with the recording device or stopping the datarecording, as indicated in function block 230. When the data recordingis stopped, the control system 120 keeps monitoring whether the recordeddata in the data buffer 104 drops below a predetermine threshold, asshown at 220. When the data buffer 104 drops below the predeterminethreshold, the control system 120 will resume the data recording of therecording device by adjusting the recording bitrate, as shown at 230.

An alternative embodiment of the method 200 is illustrated in FIG. 2B.The initial function block 210 in FIG. 2B is divided into three blocks:the recording device is started at a selected recording bitrate at 212;the recorded data is stored into a data buffer 104 (shown in FIG. 1)with a buffer size; and the recorded data in the data buffer 104 is readout for writing into an storage device 105 (shown in FIG. 1). When imagerecording of the camera is started with the data buffer 104 empty, thecamera 100 (shown in FIG. 1) can record image data with a selectedrecording bitrate, such as a default recording bitrate. The selectedrecording bitrate may be the recording bitrate that can maximize thequality of the recorded images and/or a bitrate that is selected by theuser with certain considerations, such as the specified writing speed ofthe storage device 105 and/or the expectations for the quality of therecorded images.

The data buffer 104 can be configured according to actual applications.For the camera 100, the data buffer 104 can be established with a buffersize between of 16 MB and 512 MB, including any sub-ranges, such as a 32MB sub-range (e.g. between 32 MB and 64 MB). In some embodiments, thebuffer size is 64 MB. Considerations for the size of the data buffer 104may include the selected recording bitrate, the writing speed of thestorage device 105 and/or available memory of the recording device.

The recorded data in the data buffer 104 is written to the attachedstorage device 105 in a speed that is specific to hardwareconfigurations of the storage device 105, as illustrated in FIG. 5. Inanother words, the writing speed of the storage device 105 is fixed. Inaddition, the writing speed may be uncontrollably affected by the size,the available volume of the storage device 105, and or environmentalconditions, such as the temperature. As shown in FIG. 5, when the speedof the writing into the data buffer 104 is higher than the reading outspeed from the data buffer 104, the data accumulates within the databuffer 104, and the usage level of the data buffer 104 ascends (or thefilled portion expands as illustrated in FIG. 5). On the other hand,when the speed of the writing into the data buffer 104 is lower than thereading out speed from the data buffer 104, the recorded data does notaccumulate in the data buffer 104, and the usage level of the databuffer 104 descends (or the filled portion shrinks as shown in FIG. 5).

In one embodiment, two or more sets of thresholds are provided forsignaling the data amount within the data buffer 104. As an illustrativeexample, FIG. 6 shows two sets of thresholds 152, 154 with the databuffer 104. One set of the data amount thresholds informs the controlsystem 120 (shown in FIG. 1) of the recording device when the dataamount within the data buffer 104 ascends above one or morepredetermined thresholds. The other one set of thresholds informs thecontrol system 120 of the recording device when the data amount descendsbelow one or more predetermined thresholds. Even though two sets ofthresholds are described for purposes of illustration only, any suitablepreselected number of sets of thresholds can be provided to the databuffer 104 to address different requirements of various applications.

In order to achieve the above discussed purpose, the control system 120of the recording device can detect the data amount within the databuffer 104 and/or a trend of the data amount within the data buffer 104.In order to keep track of the data amount within the data buffer 104, afirst data amount variable V1 is associated with the recording deviceand can be refreshed when the data flow 112 is written into data buffer104 and/or when the data flow 113 is read out from the data buffer 104.The first data amount variable V1 is initialized to zero. When an amountof data is written into the data buffer 104, the amount written is addedonto the first data amount variable V1, and, when an amount of data isread out from the data buffer 104, the amount read is subtracted fromthe first data amount variable V1. The control system 120 polls thefirst data amount variable V1 at predetermined time intervals.

For the same purpose, the control system 120 of the recording devicecombines a trend of the data amount change of the data buffer 104 withthe first data amount variable V1 to implement ascending thresholds and;descending thresholds. In an embodiment, a second data amount variableV2 is provided for storing the value of V1 at a previous polling time,i.e. the data amount in the data buffer 104 at an immediately precedingpolling time. When detecting whether a threshold has been triggered at aselected polling time, the control system 120 determines the trend ofthe data amount change between the previous polling time and theselected polling time and then checks whether any of the thresholdsconforming to the trend has been reached.

As an illustrative example, FIG. 7 shows three thresholds including twoascending thresholds: first ascending threshold TH1 at 42 MB and secondascending threshold TH2 at 54 MB, and one descending threshold TH3 at 21MB. In addition, FIG. 7 also shows the data amounts at polling times t₀to t₉, respectively. Referring to FIG. 7, at polling time t₀, both thefirst and second data amount variables V1, V2 are initialized to zeroand the data amount of the data buffer 104 (shown in FIG. 6) is 0 MB.

At polling time t₁, the second data amount variable V2 remains at zeroreflecting the data amount of the data buffer 104 at last polling timet₀, and the first data amount variable V1 becomes 16 MB. The data amountin the data buffer 104 is ascending because the first data amountvariable V1 has a value that is greater than the value of the seconddata amount variable V2; therefore, the first data amount variable V1 iscompared to only the ascending thresholds. In this case, no threshold istriggered since the first data amount variable V1 has reached above noascending threshold.

At polling time t₂, the second data amount variable V2 has a value of 16MB reflecting the data amount of the data buffer 104 at polling time t₁and first data amount variable V1 becomes 32 MB. There is no thresholdtriggered since the data amount of the data buffer 104 is ascending (thefirst data amount variable V1 has a value that is greater than the valueof the second data amount variable V2), and the first data amountvariable V1 has reached above no ascending threshold.

At polling time t₃, the second data amount variable V2 has a value of 32MB reflecting the data amount of the data buffer 104 at last pollingtime t₂, and the first data amount variable V1 becomes 48 MB. The dataamount in the data buffer 104 is ascending because the first data amountvariable V1 has a value that is greater than the value of the seconddata amount variable V2; therefore, the first data amount variable V1 iscompared to only the ascending thresholds. In this case, the firstascending threshold TH1 (42 MB) is triggered because the first dataamount variable V1 has reached above the first ascending threshold TH1(42 MB).

At polling time t₄, the second data amount variable V2 has a value of 48MB reflecting the data amount of the data buffer 104 at last pollingtime t₃, and the first data amount variable V1 becomes 56 MB. The dataamount in the data buffer 104 is ascending because the first data amountvariable V1 has a value that is greater than the value of the seconddata amount variable V2; therefore, the first data amount variable V1 iscompared to only the ascending thresholds. In this case, the ascendingthreshold TH2 is triggered because the first data amount variable V1 hasreached above ascending TH2 (54 MB).

At polling times t₅ and t₆, The data amount of the data buffer 104 isdescending because the first data amount variable V1 has a value that isless than the value of the second data amount variable V2; therefore,the first data amount variable V1 is compared to only the descendingthreshold TH3 (21 MB). In this case, no threshold is triggered since thefirst data amount variable V1 has not reached below the descendingthreshold TH3.

At polling time t₇, the second data amount variable V2 has a value of 32MB reflecting the data amount of the data buffer 104 at last pollingtime t₆ and the first data amount variable V1 becomes 16 MB. The dataamount of the data buffer 104 is still descending because the first dataamount variable V1 has a value that is less than the value of the seconddata amount variable V2; therefore, the first data amount variable V1 iscompared to only the descending threshold TH3 (21 MB). In this case, thefirst data amount variable V1 has reached below the descending thresholdTH3 (21 MB); therefore, the descending threshold TH3 is triggered.

Similarly, at polling time t₈, no threshold is triggered and at pollingtime t₉, the ascending threshold TH1 (42 MB) is triggered.

In the above embodiment, when a task scheduling interval of the controlsystem 120 is 1 ms, the actual polling interval for the variable V1 canbe between 20 ms and 100 ms including any sub-ranges, such as a 10 mssub-range (e.g. between 50 ms and 60 ms). The interval can be affected,for example, by the number and natures of tasks miming by the controlsystem.

The above embodiment is an exemplarily implementation only. Othermethods of implementing directional thresholds can be utilized too, forexample, allocating two variables, one for storing the trend of the dataamount change and the other one for storing the data amount of the databuffer 104.

After block 210 as shown in FIG. 2B, the control system 120 of therecording device continues to monitor the data amount of the data buffer104, as indicated at 220. If any of the thresholds, either ascending ordescending, is reached and/or passed, the control system 120 can takepredetermined action (as discussed in detail below) in response to thedata amount change; otherwise, the control system 120 can keepperforming the actions that the recording device has been doing afterblock 210.

When the control system 120 receives a threshold triggering signalreflecting the trend and the amount of the recorded data within the databuffer 104, the control system 120 adjusts the recording bitrate of therecording device to control the data amount of the data buffer 104 in aneffort to avoid data overflow and/or to achieve maximum recordingquality, as indicated at 230. Available actions include reducing thebitrate for data recording when the data level of the data buffer 104 istoo high while ascending. Thereby, the data writing speed into the databuffer 104 is reduced in an effort to reach a new balance between thespeed of writing into the data buffer 104 and the speed of reading outfrom the data buffer 104. An alternatively and/or additional action caninclude increasing the recording bitrate, if possible, when the datausage is too low while descending. The recording bitrate cannot befurther increased, for example, if the maximum recording bitrate isbeing used by the recording device. Increasing the recording bitrate canbe used to maximize the quality for data recording. When the data amountof the data buffer 104 reaches over a threshold reflecting a danger ofbuffer overflow, the control system 120 may stop the data recording andwait for the data amount to decrease to avoid possible recording failuredue to buffer overflow, at 230. The control system 120, at 220, keepsmonitoring the data change and the data amount.

An alternative embodiment of method 200 is illustrated in FIG. 3. InFIG. 3, the starting block 210 is same as discussed in FIG. 2B withthree sub-blocks 212, 214 and 216. However, block 220 (shown in FIG. 2B)of the method 200 is divided into steps 222 and 224; and block 230(shown in FIG. 2B) is divided into steps 232, 234 and 236.

In the method 200 shown in FIG. 3, the control system 120 (shown inFIG. 1) of the recording device, such as the camera 100 (shown inFIG. 1) monitors whether a specific ascending threshold is triggeredafter the initial block 210. If the specific ascending threshold is nottriggered, the control system 120 does not take any action as shown infunction block 224, in which the recording system keeps its datarecording with the selected recording bitrate as described in FIG. 2Band writing the data within the data buffer 104 (shown in FIG. 1) intothe attached storage device 105 (shown in FIG. 1) in the manner asdescribed with reference to FIG. 2B.

However, when the specific ascending threshold triggering signal isreceived, the control system 120 can reduce the recording bitrate of therecording device and/or stop the data recording of the recording device,as indicated in functional block 232. When one of such actions is taken,the control system 120 continues monitoring the data amount of the databuffer 104 until a new threshold is reached or passed as described indecision blocks 234 and 222.

As described in decision block 234, if the data amount of the databuffer 104 reaches below a specific descending threshold after thereduction to the recording bitrate of the recording device, indicatingthe reduction is effective, the control system 120 of the recordingdevice can increase the recording bitrate of the recording device, at236, including resuming the selected recording bitrate as described inFIG. 2B; if the data amount of the data buffer 104 triggers anotherascending threshold after the reduction to the recording bitrate, thecontrol system 120 may take further actions to decrease the recordingbitrate of the recording device or even stop the recording, if therecording has not been stopped already, as described in blocks 302 and305. In any function block in FIG. 3, if no threshold signal istriggered, the control system 120 does not change the current actions ofthe recording device. At any time, if there is any data in the databuffer 104, the control system 120 keeps writing the data in the databuffer 104 into the attached storage device 105 with the built-inwriting speed of the storage device 105.

In a preferable embodiment as illustrated in FIG. 4, as described forFIG. 2B and for FIG. 3, two or more sets of thresholds (as 152 and 154shown in FIG. 6) are provided with the data buffer 104. Of the two ormore sets of thresholds, at least one set are ascending thresholds forinforming the control system 120 (shown in FIG. 1) of the recordingdevice when the data amount is ascends above one or more predeterminedthresholds (as 152 shown in FIG. 6). At least another set of thresholdsare descending thresholds for informing the control system 120 of therecording device when the data amount descends below one or morepredetermined thresholds (as 154 shown in FIG. 6).

The one set of ascending thresholds 152 may include a first specifiedascending threshold with lower value and a second specified ascendingthreshold with higher value. An exemplary preselected ranges for thefirst specified ascending threshold can include between sixty percent(60%) and eighty percent (80%) of the buffer size, including anypercentage sub-ranges, such as a five percent sub-range (e.g., betweensixty-five percent (65%) and seventy percent (70%)) and/or a ten percentsub-range (e.g., between sixty percent (60%) and seventy percent (70%)),within the preselected percentage range, without limitation. A preferredpercentage value of the first specified ascending threshold isseventy-five percent (75%) of the buffer size. An exemplary preselectedranges for the second specified ascending threshold can include betweenseventy percent (70%) and ninety-five percent (95%) of the buffer size,including any percentage sub-ranges, such as a five percent sub-range(e.g., between seventy-five percent (75%) and eighty percent (80%))and/or a ten percent sub-range (e.g., between eighty percent (80%) andninety percent (90%)), within the preselected percentage range, withoutlimitation. A preferred percentage value of the second specifiedascending threshold is ninety percent (90%) of the buffer size.

The one set of descending thresholds 154 may include a first specifieddescending threshold. An exemplary preselected ranges for the firstspecified descending threshold can include between thirty percent (30%)and fifty percent (50%) of the buffer size, including any percentagesub-ranges, such as a five percent sub-range (e.g., between thirty-fivepercent (35%) and forty percent (40%)) and/or a ten percent sub-range(e.g., between forty percent (40%) and fifty percent (50%)), within thepreselected percentage range, without limitation. A preferred percentagevalue of the first specified descending threshold is thirty-five percent(35%) of the buffer size.

At 222 of FIG. 4, the control system 120 of the recording devicemonitors whether the first specified ascending threshold is triggered.

When the control system 120 receives a triggering signal of the firstspecified ascending threshold, the control system 120 of the recordingdevice reduces the recording bitrate of the recording device, asfunction block 232A is indicated. The reduction of recording bitrate, inturn, reduces the data generating speed and slows down the filling upspeed of the data buffer 104. The reduction percentage ranges forrecording bitrate include between thirty percent (30%) and eightypercent (80%) of the selected recording bitrate, including anypercentage sub-ranges, such as a five percent sub-range (e.g., betweenfifty-five percent (55%) and sixty percent (60%)) and/or a ten percentsub-range (e.g., between sixty percent (60%) and seventy percent (70%)),within the preselected percentage range, without limitation. Thepreferred value of the reduced recording bitrate is fifty percent (50%)of the selected recording bitrate.

After the recording bitrate reduction, three possible outputs may beachieved as a result of the reduction of the recording bitrate: (1) anew balance is reached between the speed of writing into the data buffer104 and the speed of reading out from the data buffer 104 into thestorage device 105 when the data flow (at 112 in FIG. 1) speed generatedby the reduced recording bitrate approximately equals to the writingspeed of the storage device 105; (2) the data amount within the databuffer 104 descends when the data flow (112 in FIG. 1) speed generatedby the reduced recording bitrate becomes lower than the writing speed ofthe storage device 105; or (3) the data amount within the data buffer104 keeps ascending when the data flow (at 112 in FIG. 1) speedgenerated by the reduced recording bitrate is still higher than thewriting speed of the storage device 105.

In conditional block 234A, the control system 120 of the recordingdevice does not take further action under the above stated result (1),so, the recording device keeps data recording with the reduced bitrate,writing the recorded data into the data buffer 104 and reading therecorded data out into the storage device 105. In this case, the qualityof the recording data is optimized because the writing speed of thestorage device 105 is fully utilized with the recorded data in databuffer 104.

When the control system 120 of the recording device receives a thresholdtriggering signal indicating the above stated result (2), i.e. the dataamount data amount within the data buffer 104 reaches below the firstspecified descending threshold, the control system 120 of the recordingincreases the recording bitrate at 236B. The recording device may returnto the initial state defined in block 210, when the recording bitrate isincreased to the selected recording speed. On the other hand, when thecontrol system 120 of the recording device receives a thresholdtriggering signal indicating the above stated result (3), i.e. the dataamount within the data buffer 104 reaches above the second specifiedascending threshold, the control system 120 of the recording devicestops the data recording at 232B. When recording stopped, the controlsystem 120 waits for the available space in the data buffer 104, atblock 234B. With blocks 232B and 234B, the system avoids the overflow ofthe data buffer 104 in order to avoid a recording failure by therecording device.

When the data recording is stopped at 232B, the recorded data within thedata buffer 104 will be read out to the storage device 105. In thiscase, because the data may only be read out from the data buffer 104,the data amount of the data buffer 104 descends. When the data amount ofthe data buffer 104 reaches below the first specified descendingthreshold, at 234B, the camera system resumes the selected recordingbitrate and the recording device goes back to the initial recordingstate at 236B. Before the first specified descending threshold istriggered, the control system 120 keeps the data recording stopped inorder to wait for the recorded data in the data buffer 104 to be readout to the storage device 105.

The embodiment advantageously can help ensure that the data buffer 104always has certain data amount as long as the data recording is notterminated by a user. The recorded data available in the data buffer 104utilizes 100% of the writing speed of the storage device 105 providedthat the selected recording speed of the recording device is higher thanthe writing speed of the storage device 105. Therefore, the quality ofthe recording data is optimized with the bottleneck limitation of thewriting speed of the storage device 105.

In order to make the above embodiments more flexible, the one set ofdescending thresholds 152 can also include a second specified descendingthreshold which is greater than the first specified descendingthreshold. An exemplary preselected ranges for the second specifieddescending threshold can include between seventy percent (70%) andninety-five percent (95%) of the buffer size, including any percentagesub-ranges, such as a five percent sub-range (e.g., between seventy-fivepercent (75%) and eighty percent (80%) and/or a ten percent sub-range(e.g., between eighty percent (80%) and ninety percent (90%)), withinthe preselected percentage range, without limitation. A preferredpercentage value of the second specified descending threshold is ninetypercent (90%) of the buffer size.

The second specified plays an intermediate role before the controlsystem 120 of the recording device gets a triggering signal of the firstspecified descending threshold. For example, when the second specifieddescending threshold is triggered, the control system 120 of therecording device resumes the data recording with a reduced recordingbitrate (not shown). After this, if the data descends below firstspecified descending threshold, the control system 120 may resumes theselected recording bitrate. If the data amount rebounds above the secondspecified ascending threshold, the control system 120 stops the datarecording again.

The above described embodiments may apply to certain types of recordingdevices that are capable of continuously data recording where externalstorage devices are used to store the recorded data. Typical recordingdevices include cameras with data recording capability and audiorecording devices, such as digital voice recorders etc. But theembodiments are not limited to those particular applications.

The described embodiments are susceptible to various modifications andalternative forms, and specific examples thereof have been shown by wayof example in the drawings and are herein described in detail. It shouldbe understood, however, that the described embodiments are not to belimited to the particular forms or methods disclosed, but to thecontrary, the present disclosure is to cover all modifications,equivalents, and alternatives.

What is claimed is:
 1. A method for enabling a recording device with anadjustable recording bitrate to adapt to a predetermined writing speedof a storage device removably attached to the recording device,comprising: establishing a set of thresholds including a firstdescending threshold, a first ascending threshold, a second descendingthreshold, and a second ascending threshold for a data amount, the firstascending threshold being higher than the first descending threshold andlower than the second descending threshold, the second ascendingthreshold being higher than the second descending threshold; storingdata recorded by the recording device at a selected recording bitrate ina data buffer coupled with the recording device; writing the recordeddata from the data buffer into the storage device; monitoring the dataamount of the recorded data in the data buffer; monitoring a trend ofchange in the data amount; determining whether the data amount hasreached a threshold selected from the set of thresholds; in response tothe data amount having reached the first ascending threshold and thetrend of change in the data amount being an ascending change, reducingthe recording bitrate; in response to the data amount having reached thesecond ascending threshold and the trend of change in the data amountbeing an ascending change, stopping the data recording; in response tothe data amount having reached the first descending threshold and thetrend of change in the data amount being a descending change, increasingthe recording bitrate; and in response to the data amount being belowthe second descending threshold, the trend of change in the data amountbeing a descending change, and the data recording having been stopped,resuming the data recording with a reduced recording bitrate.
 2. Themethod of claim 1, wherein monitoring the trend of change in the dataamount comprises comparing amounts of the recorded data within the databuffer by polling the data amount at specified time intervals.
 3. Themethod of claim 1, wherein the establishing the set of thresholdscomprises: establishing the first ascending threshold within a range ofsixty percent (60%) to eighty percent (80%) of the buffer size; andestablishing the second ascending threshold greater than the firstascending threshold and within a range of seventy percent (70%) toninety-five (95%) of the buffer size.
 4. The method of claim 3, whereinthe establishing the set of thresholds comprises: establishing the firstdescending threshold within a range of thirty percent (30%) to fiftypercent (50%) of the buffer size.
 5. The method of claim 4, wherein:establishing the set of thresholds further comprises establishing thesecond descending threshold within the range of seventy percent (70%) toninety-five percent (95%) of the buffer size.
 6. The method of claim 1,wherein reducing the recording bitrate comprises reducing the recordingbitrate to a range of thirty percent (30%) to eighty percent (80%) ofthe selected recording bitrate in response to the data amount havingreached the first ascending threshold and the trend of change in thedata amount being an ascending change.
 7. A recording device with anadjustable recording bitrate to adapt to a predetermined writing speedof a storage device removably attached to the recording device,comprising: a data buffer with a buffer size for storing recorded dataand for writing the recorded data into the storage device; and a controlsystem, configured to: establish a set of thresholds including a firstdescending threshold, a first ascending threshold, a second descendingthreshold, and a second ascending threshold for a data amount, the firstascending threshold being higher than the first descending threshold andlower than the second descending threshold, the second ascendingthreshold being higher than the second descending threshold; monitor thedata amount of the recorded data in the data buffer; monitor a trend ofchange in the data amount; determine whether the data amount has reacheda threshold selected from the set of thresholds; reduce the recordingbitrate in response to the data amount reaching the first ascendingthreshold and the trend of change in the data amount being an ascendingchange; stop the data recording in response to the data amount havingreached the second ascending threshold and the trend of change in thedata amount being an ascending change; increase the recording bitrate inresponse to the data amount having reached the first descendingthreshold and the trend of change in the data amount being a descendingchange; and resume the data recording with a reduced recording bitratein response to the data amount being below the second descendingthreshold, the trend of change in the data amount being a descendingchange, and the data recording having been stopped.
 8. The recordingdevice according to claim 7, wherein: the first ascending threshold isselected within a range of sixty percent (60%) to eighty percent (80%)of the buffer size; and the second ascending threshold is selectedwithin a range of seventy percent (70%) to ninety-five percent (95%) ofthe buffer size.
 9. The recording device of claim 8, wherein the firstdescending threshold is selected within a range of thirty percent (30%)to fifty percent (50%) of the buffer size.
 10. The recording device ofclaim 9, wherein the control system is configured to reduce therecording bitrate to a range of thirty percent (30%) to eighty percent(80%) of the selected recording bitrate in response to the data amountreaching the first ascending threshold and the trend of change in thedata amount being an ascending change.
 11. The recording device of claim7, wherein the storage device is removably attached with the recordingdevice.
 12. An unmanned aerial vehicle, comprising, a vehicle body; anda recording device coupled with the vehicle body, the recording devicecomprising: a data buffer with a buffer size for storing recorded dataand for writing the recorded data into the storage device; and a controlsystem configured to: establish a set of thresholds including a firstdescending threshold, a first ascending threshold, a second descendingthreshold, and a second ascending threshold for a data amount, the firstascending threshold being higher than the first descending threshold andlower than the second descending threshold, the second ascendingthreshold being higher than the second descending threshold; monitor thedata amount of the recorded data in the data buffer; monitor a trend ofchange in the data amount; determine whether the data amount has reacheda threshold selected from the set of thresholds; reduce the recordingbitrate in response to the data amount reaching the first ascendingthreshold and the trend of change in the data amount being an ascendingchange; stop the data recording in response to the data amount havingreached the second ascending threshold and the trend of change in thedata amount being an ascending change; increase the recording bitrate inresponse to the data amount having reached the first descendingthreshold and the trend of change in the data amount being a descendingchange; and resume the data recording with a reduced recording bitratein response to the data amount being below the second descendingthreshold, the trend of change in the data amount being a descendingchange, and the data recording having been stopped.